<template>
  <div>
    <input type="text" :value="value" @input="handleInput" :placeholder="placeholder" />
  </div>
</template>
<script>
export default {
  name: 'kInput',
  props: {
    value: [String, Number],
    placeholder: String
  },
  methods: {
    handleInput ($event) {
      // 通过input标签的原生事件input将值emit出去，以达到值得改变实现双向绑定
      this.$emit('input', $event.target.value)
    }
  }
}
</script>
<style scoped type="less">
</style>